﻿/*
#------------------------------------------------------------------------------
#-- Program Name:	[dbo].[spPostDeploy_LookupTable_systargetservergroups]
#-- Purpose:		To be called by a process after the TFS Build has completed.
#--					Updates the tblScripts lookup table to be the latest values.
#--	Last Update:	05/06/2013
#--					For a complete history - please review comments in Version
#--					Control.
#------------------------------------------------------------------------------
*/
CREATE PROCEDURE [dbo].[spPostDeploy_LookupTable_systargetservergroups]
AS

SET NOCOUNT ON

INSERT INTO [msdb].[dbo].[systargetservergroups] (name)
	SELECT		t1.name
	FROM		(
				SELECT	('MSX 1') name
				UNION
				SELECT	('MSX 2')
				UNION
				SELECT	('MSX 3')
				UNION
				SELECT	('MSX 4')
				UNION
				SELECT	('MSX 5')
				UNION
				SELECT	('MSX 6')
				) t1
	LEFT JOIN	[msdb].[dbo].[systargetservergroups] t2 ON t1.name = t2.name
	WHERE		t2.name IS NULL

SET NOCOUNT OFF